package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Role;
import com.zzyl.entity.UserRole;
import com.zzyl.vo.RoleVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserRoleMapper {
    @Select("select count(*) from sys_user_role where role_id = #{id}")
    Integer countByRoleId(Long id);

    void insertBatch(@Param("userRoleList") List<UserRole> userRoleList);

    @Delete("delete from sys_user_role where user_id = #{id}")
    void deleteByUserId(Long id);

    @Select("select role_id from sys_user_role where user_id = #{id}")
    List<Long> selectRoleId(Long Id);
}
